package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;

@Entity
@Table(name = "editor_answer")
public class EditorAnswerEntity {
    private String answerId;
    private String questionnaireId;
    private String userInfoId;
    private String titleId;
    private Byte optionType;
    private String optionId;
    private String answerContent;
    private String answerDesc;

    @Id
    @Column(name = "answer_id")
    public String getAnswerId() {
        return answerId;
    }

    public void setAnswerId(String answerId) {
        this.answerId = answerId;
    }

    @Basic
    @Column(name = "questionnaire_id")
    public String getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(String questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    @Basic
    @Column(name = "user_info_id")
    public String getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(String userInfoId) {
        this.userInfoId = userInfoId;
    }

    @Basic
    @Column(name = "title_id")
    public String getTitleId() {
        return titleId;
    }

    public void setTitleId(String titleId) {
        this.titleId = titleId;
    }

    @Basic
    @Column(name = "option_type")
    public Byte getOptionType() {
        return optionType;
    }

    public void setOptionType(Byte optionType) {
        this.optionType = optionType;
    }

    @Basic
    @Column(name = "option_id")
    public String getOptionId() {
        return optionId;
    }

    public void setOptionId(String optionId) {
        this.optionId = optionId;
    }

    @Basic
    @Column(name = "answer_content")
    public String getAnswerContent() {
        return answerContent;
    }

    public void setAnswerContent(String answerContent) {
        this.answerContent = answerContent;
    }

    @Basic
    @Column(name = "answer_desc")
    public String getAnswerDesc() {
        return answerDesc;
    }

    public void setAnswerDesc(String answerDesc) {
        this.answerDesc = answerDesc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        EditorAnswerEntity that = (EditorAnswerEntity) o;

        if (answerId != null ? !answerId.equals(that.answerId) : that.answerId != null) {
            return false;
        }
        if (questionnaireId != null ? !questionnaireId.equals(that.questionnaireId) : that.questionnaireId != null) {
            return false;
        }
        if (userInfoId != null ? !userInfoId.equals(that.userInfoId) : that.userInfoId != null) {
            return false;
        }
        if (titleId != null ? !titleId.equals(that.titleId) : that.titleId != null) {
            return false;
        }
        if (optionType != null ? !optionType.equals(that.optionType) : that.optionType != null) {
            return false;
        }
        if (optionId != null ? !optionId.equals(that.optionId) : that.optionId != null) {
            return false;
        }
        if (answerContent != null ? !answerContent.equals(that.answerContent) : that.answerContent != null) {
            return false;
        }
        if (answerDesc != null ? !answerDesc.equals(that.answerDesc) : that.answerDesc != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = answerId != null ? answerId.hashCode() : 0;
        result = 31 * result + (questionnaireId != null ? questionnaireId.hashCode() : 0);
        result = 31 * result + (userInfoId != null ? userInfoId.hashCode() : 0);
        result = 31 * result + (titleId != null ? titleId.hashCode() : 0);
        result = 31 * result + (optionType != null ? optionType.hashCode() : 0);
        result = 31 * result + (optionId != null ? optionId.hashCode() : 0);
        result = 31 * result + (answerContent != null ? answerContent.hashCode() : 0);
        result = 31 * result + (answerDesc != null ? answerDesc.hashCode() : 0);
        return result;
    }
}
